pkgname=device-qemu-amd64
pkgver=1
pkgrel=16
pkgdesc="Simulated device in qemu with an x86 platform"
url="https://github.com/postmarketOS"
arch="noarch"
license="MIT"
# NOTE: 'pmbootstrap init' allows you to choose the mesa-dri-* package
depends="postmarketos-base linux-postmarketos-lts"
makedepends=""
subpackages="$pkgname-x11 $pkgname-weston"
source="deviceinfo weston.ini"
options="!check"

package() {
	install -D -m644 "$srcdir"/deviceinfo \
		"$pkgdir"/etc/deviceinfo
}

x11() {
	install_if="$pkgname xorg-server"
	depends="xf86-video-qxl"
	mkdir "$subpkgdir"
}

weston() {
	install_if="$pkgname weston"
	install -Dm644 "$srcdir"/weston.ini \
		"$subpkgdir"/etc/xdg/weston/weston.ini
}

sha512sums="eb12ff5fe6fe592661facd3f8c910e00752e963b2092f4d4062c4af67972249233d20d641355e03de17ab537f42617140ccb9c296c2dcfb6077785fa9eeb25fd  deviceinfo
df0fe900693e5f176076c59f5379e56aaa96c3df16a4120448f15b71f530170730b43e5fe32733c40c118a00ca3581043231a062a8a1eb0a930bfbfbb6c52a47  weston.ini"
